package com.example.review.ChildFragment;


import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.fragment.app.Fragment;

import com.example.review.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * A simple {@link Fragment} subclass.
 */
public class ImgFragment extends Fragment {
    @BindView(R.id.img_varpage)
    ImageView imgVarpage;
    private View view;
    private Integer[] img = new Integer[]{R.drawable.preview, R.drawable.preview1, R.drawable.preview2, R.drawable.preview3,};
    private int sign =0;
    public ImgFragment(int i) {
        sign=i;
        // Required empty public constructor
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        view = inflater.inflate(R.layout.fragment_img1, container, false);
        ButterKnife.bind(this,view);
        imgVarpage.setImageResource(img[sign]);
        return view;
    }

}
